from django.db import models


class User(models.Model):
    user_id = models.IntegerField(verbose_name='用户ID')
    username = models.CharField(verbose_name='用户名', max_length=50)
    password = models.CharField(verbose_name='密码', max_length=50)

    def __str__(self):  # 必须返回string
        return '{}'.format(self.username)

    class Meta:
        ordering = ['user_id']
        verbose_name = '用户信息'
        verbose_name_plural = '用户信息列表'
        db_table = 'LOGIN_USER'


